package cn.schoolwow.workflow.module.option.kit;

import cn.schoolwow.quickdao.domain.DAO;
import cn.schoolwow.quickflow.QuickFlow;
import cn.schoolwow.workflow.module.common.domain.QuickWorkFlowConfig;

public class WorkFlowOptionImpl implements WorkFlowOption{
    private QuickWorkFlowConfig quickWorkFlowConfig;

    public WorkFlowOptionImpl(QuickWorkFlowConfig quickWorkFlowConfig) {
        this.quickWorkFlowConfig = quickWorkFlowConfig;
    }

    @Override
    public QuickFlow getWorkFlow() {
        return quickWorkFlowConfig.workflow;
    }

    @Override
    public DAO getWorkFlowDAO() {
        DAO dao = quickWorkFlowConfig.workflow.getContextInstanceData(DAO.class);
        return dao;
    }
}
